package demo.practice.competition;

public class P5781 {


    /*public String removeOccurrences(String s, String part) {


    }*/

    public static void main(String[] args) {
        P5781 p5781= new P5781();
        p5781.removeOccurrences("axxxxyyyyb","xy");
    }

    public String removeOccurrences(String s, String part) {

        if (s.contains(part)) {
            s = s.substring(0, s.indexOf(part)) + s.substring(s.indexOf(part)+part.length());
            return removeOccurrences(s,part);
        }else{
            return s;
        }
    }

}
